From rent seeking to human capital: a model where resource shocks cause transitions from stagnation to growth